﻿using System;
using System.Linq;

class Program
{
    static void Main()
    {
        //空格分割
        string input = Console.ReadLine();
        string[] inputArray = input.Split(' ');
        int[] numbers = new int[inputArray.Length];
        for (int i = 0; i < inputArray.Length; i++)
        {
            string a = inputArray[i];
            numbers[i] = int.Parse(a);
        }

        int max = numbers[0];
        int min = numbers[0];
        int sum = 0;

        // 遍历数组计算最大值、最小值和总和
        for(int i=0;i<numbers.Length;i++)
        {
            if (numbers[i] > max)
                max = numbers[i];
            if (numbers[i] < min)
                min = numbers[i];
            sum += numbers[i];
        }

        // 计算平均值
        double average = (double)sum / numbers.Length;

        // 输出结果
        Console.WriteLine("最大值: " + max);
        Console.WriteLine("最小值: " + min);
        Console.WriteLine("所有元素的和: " + sum);
        Console.WriteLine("平均值: " + average);




    }
}